Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sampling with an Exponent different from two. #41

Merged
merged 7 commits into from
Jun 9, 2023

Conversation

RehMoritz
Copy link
Collaborator

@RehMoritz RehMoritz commented Apr 14, 2023

Allow acceptance probabilities different from $|\psi(s)|^2$.
In the proposed PR, acceptance probabilities are $|\psi(s)|^\mu$.
Consequently, all expectation values require reweighting with probabilities $|\psi(s)|^{2-\mu}$.
In this PR, samples are expected to be returned together with such a probability distribution (In the case of $\mu=2$, this distribution is equivalent to the uniform distribution).
Therefore, the differentiation between cases where a probability distribution is provided alongside the samples and those where it is not is no longer necessary. These functions have been deleted.
Two tests were added to certify the correct working of the sampler: A time evolution in the tdvp_t.py test file and a sampling test in sampler_t.py.
Quantities that are evaluated using the mpi_wrapper.py are expected to be arrays of rank 3, to allow for unified treatment of all cases.

@RehMoritz RehMoritz requested a review from markusschmitt April 14, 2023 13:57
@markusschmitt
Copy link
Owner

I added a new SampledObs class (in stats.py) that makes the computation of means and (co-)variances easier.

@markusschmitt markusschmitt merged commit 1f4f8df into master Jun 9, 2023
@markusschmitt markusschmitt deleted the sampling_wExponent branch June 9, 2023 07:57
@markusschmitt markusschmitt linked an issue Jun 9, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add possibility for importance sampling
2 participants